#include "../Model/ssm.h"
#include <stdio.h>

int main()
{
	Weather source, dest;

	source.rho		= 45.1;
	source.sun_rise		= 4.25;
	source.sun_set		= 159.3;
	source.sun_length	= 7632.1;
	source.phi_n		= 65.123;
	source.phi		= .0342;
	source.theta		= 35.852;

	writeWeather("testWeather.dat",&source);

	readWeather("testWeather.dat",&dest);

	if(	dest.rho		== 45.1 &&
		dest.sun_rise		== 4.25 &&
		dest.sun_set		== 159.3 &&
		dest.sun_length		== 7632.1 &&
		dest.phi_n		== 65.123 &&
		dest.phi		== .0342 &&
		dest.theta		== 35.852)
	{
		return 0;
	}
	
	fprintf(stderr,"ERROR: sourceWeather != destWeather\n");
	return -1;
}
